# Copyright 2008 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Django settings for google-app-engine-django project.

import os
import sys
import logging

DEBUG = False
TEMPLATE_DEBUG = DEBUG

ADMINS = (
    # ('Your Name', 'your_email@domain.com'),
)

MANAGERS = ADMINS

DATABASE_ENGINE = 'appengine'  # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
DATABASE_NAME = ''             # Or path to database file if using sqlite3.
DATABASE_USER = ''             # Not used with sqlite3.
DATABASE_PASSWORD = ''         # Not used with sqlite3.
DATABASE_HOST = ''             # Set to empty string for localhost. Not used with sqlite3.
DATABASE_PORT = ''             # Set to empty string for default. Not used with sqlite3.

# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# If running in a Windows environment this must be set to the same as your
# system time zone.
TIME_ZONE = 'UTC'

# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE = 'en-us'

SITE_ID = 1

# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = True

# Absolute path to the directory that holds media.
# Example: "/home/media/media.lawrence.com/"
MEDIA_ROOT = ''

# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash if there is a path component (optional in other cases).
# Examples: "http://media.lawrence.com", "http://example.com/media/"
MEDIA_URL = ''

# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
# trailing slash.
# Examples: "http://foo.com/media/", "/media/".
ADMIN_MEDIA_PREFIX = '/media/'

# Make this unique, and don't share it with anybody.
SECRET_KEY = ''

# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
    'django.template.loaders.filesystem.load_template_source',
    'django.template.loaders.app_directories.load_template_source',
#     'django.template.loaders.eggs.load_template_source',
)

MIDDLEWARE_CLASSES = (
    'django.middleware.common.CommonMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
#    'django.middleware.doc.XViewMiddleware',
    'osda.middleware.AddUserToRequestMiddleware',
)


TEMPLATE_CONTEXT_PROCESSORS = (
    'django.core.context_processors.auth',
    'django.core.context_processors.debug',
    'django.core.context_processors.i18n',
#    'django.core.context_processors.media',  # 0.97 only.
#    'django.core.context_processors.request',
)

ROOT_URLCONF = 'osda.urls'

ROOT_PATH = os.path.dirname(__file__)
TEMPLATE_DIRS = (
    os.path.join(ROOT_PATH, 'templates')
)

INSTALLED_APPS = (
     'osda',
     'appengine_django',
     'django.contrib.auth',
#    'django.contrib.contenttypes',
#    'django.contrib.sessions',
#    'django.contrib.sites',
)


PRIVATE_KEYS = [
]

BLOG_URLS = [
  ("myspace", 
   "http://feeds.feedburner.com/myspace/rOsQ?format=xml"),
  ("opensocial", 
   "http://feeds.feedburner.com/OpensocialApiBlog?format=xml"),
  ("orkut", 
   "http://feeds.feedburner.com/OrkutDeveloperBlog?format=xml"),
  ("hi5", 
   "http://www.hi5networks.com/developer/atom.xml"),
  ("igoogle", 
   "http://feeds.feedburner.com/IgoogleDeveloperBlog?format=xml"),
  ("ning", 
   "http://feeds.feedburner.com/FeaturedBlogPosts-NingDeveloperNetwork?format=xml"),
]

PUBLIC_KEYS = [
    ("kurrik",
     "RSA-SHA1",
     "openssl_key_pk8_shindig.pem",
     "0x00deb51922b2a31dfea37045540385be3b39343ff5b384e105339a78e534d13" +
     "dacf7adad7c20117e180f5f25b702c8730794a0eaa6a9e69e37b53fad0a1fc6ff" +
     "cb838a6d8592de2456aed9027087b4cea8df20f5ae7a00b758043708f0a9a2f68" +
     "f4923d43e19ffe358872ad90700782fbb9a9acdbe207bdc35cddbe30e8fecb7d5"),

    ("orkut.com",
     "RSA-SHA1",
     "pub.1199819524.-1556113204990931254.cer",
     "0x00b1e057678343866db89d7dec251899261bf2f5e0d95f5d868f81d600c9a10" +
     "1c9e6da20606290228308551ed3acf9921421dcd01ef1de35dd3275cd4983c7be" +
     "0be325ce8dfc3af6860f7ab0bf32742cd9fb2fcd1cd1756bbc400b743f73acefb" +
     "45d26694caf4f26b9765b9f65665245524de957e8c547c358781fdfb68ec056d1"),

    ("google.com",
     "RSA-SHA1",
     "pub.1199819524.-1556113204990931254.cer",
     "0x00b1e057678343866db89d7dec251899261bf2f5e0d95f5d868f81d600c9a10" +
     "1c9e6da20606290228308551ed3acf9921421dcd01ef1de35dd3275cd4983c7be" +
     "0be325ce8dfc3af6860f7ab0bf32742cd9fb2fcd1cd1756bbc400b743f73acefb" +
     "45d26694caf4f26b9765b9f65665245524de957e8c547c358781fdfb68ec056d1"),

    ("igoogle.com",
     "RSA-SHA1",
     "pub.1199819524.-1556113204990931254.cer",
     "0x00dc3b36b5d4b5e50f383c6df950e652ad355f68f33181687d8da673a00e75d" +
     "47d2caa1a75f9fedb386a304a0f9e8fe1e3f6bc71990f5234ef5a2d7bac3d7b13" +
     "af59b8f3336f2b33d0502378c69851b738b6e74d13cfd082c336e21e83e150ed2" +
     "80e15706f111dac5236830ddcfe48f76333b398d56ffe8698078637b911a540e1"),

    ("hi5.com",
     "RSA-SHA1",
     "hi5modules.com-key",
     "0x009981dad8b0409e18efd8b2b0df68efef23232aefe0d87409889b3c20df9c2" +
     "7b62dc3af707a912e8e791881008513bdd6575f75e2b491715650c51ff3db4629" +
     "a6d1ddde42f49f5b7fb4c48845f42dc4f50163e8b581cfa6c1961e69d29497ca0" +
     "019f405d1d4e30cda50d147d870429d58563cc99378585b6a83e7dd5ab91390bf"),

    ("hi5.com",
     "RSA-SHA1",
     "hi5",
     "0x009981dad8b0409e18efd8b2b0df68efef23232aefe0d87409889b3c20df9c2" +
     "7b62dc3af707a912e8e791881008513bdd6575f75e2b491715650c51ff3db4629" +
     "a6d1ddde42f49f5b7fb4c48845f42dc4f50163e8b581cfa6c1961e69d29497ca0" +
     "019f405d1d4e30cda50d147d870429d58563cc99378585b6a83e7dd5ab91390bf"),

     ("",
      "RSA-SHA1",
      "hi5",
      "0x009981dad8b0409e18efd8b2b0df68efef23232aefe0d87409889b3c20df9c2" +
      "7b62dc3af707a912e8e791881008513bdd6575f75e2b491715650c51ff3db4629" +
      "a6d1ddde42f49f5b7fb4c48845f42dc4f50163e8b581cfa6c1961e69d29497ca0" +
      "019f405d1d4e30cda50d147d870429d58563cc99378585b6a83e7dd5ab91390bf"),
      
    ("friendster.com",
     "RSA-SHA1",
     "http://www.fmodules.com/public080813.crt",
     "0x00c958e75f61eb48b4f202e8767f6fce4915a42c5a37faafa5d02cdbe3cbf6e" +
     "0c7ba0aca1ec643e0c0b3a35e63e7fcfb7c5adc258ac40fb59f515f7d22ca6834"
     "a3"),

    ("partuza",
     "RSA-SHA1",
     "http://app0537.modules.partuza.nl/public.crt",
     "0x00b0aea7116e99321b9046549bf71b8f55ed134fa686ac32fa2e229ceb4f145" +
     "bec96803d1897f40a96853a12e0b7a5c3472986aa41474be525d6be0acb376f8d" +
     "d3579640bb0e17163643bd82d3b14cdf3d8755175132d83be3eced02d092ce010" +
     "b59c6cb0e91202613fa89a623bef14a23263411f80194deddf86bc57d84b3ee95"),

    ("ning.com",
     "RSA-SHA1",
     "ning.com",
     "0x00b4d8fdadd8662f66e6a18fc096f195237a79c337ea5ce9d54e324c1947108" +
     "b17f87528e811356e68e74a07c4e8aa9b247900b0feb184008f32372cae57fff9" +
     "cff781d1732a73a04d5a0ff761ed5a06f648f4bd89e9ffde42c14b5155699e90d" +
     "549502cc04727d699abd464b45aeabc68b1cfa862ecc4381ce5f3b3d859f64273"),

    ("netlog.com",
     "RSA-SHA1",
     "netlog.com",
     "0x00b311decac59f2f50ca9f02c7245e993431489005a1224b7b953b030b9ea69" +
     "0711519cf99e6e6f8b472189bbbd76ec3f9b8f0d7bca71cf1ebe5baa61d207a38" +
     "1258302ddb611b0bfafd969a7ca81fc4b2833380236b27c0db1c72f7a6e57d456" +
     "2b61afaf9bd1e89f7240706b746005ba744fbc5e836a81dae708d655d59cfc617"),

     ("netlog.com",
      "RSA-SHA1",
      "http://api.netlog.com/opensocial/public.cer",
      "0x00b311decac59f2f50ca9f02c7245e993431489005a1224b7b953b030b9ea69" +
      "0711519cf99e6e6f8b472189bbbd76ec3f9b8f0d7bca71cf1ebe5baa61d207a38" +
      "1258302ddb611b0bfafd969a7ca81fc4b2833380236b27c0db1c72f7a6e57d456" +
      "2b61afaf9bd1e89f7240706b746005ba744fbc5e836a81dae708d655d59cfc617"),

    ("hyves.nl",
     "RSA-SHA1",
     "hyvespublic-3aac76b8327a963876efe4ee619a636c.cer",
     "0x00cec3e2e5d29be3b225be25e88b862ff7d12d27627bf4d3b402bc4002ac82a" +
     "66e4d70efe0b16a76968c4b37c76e00bbc929b74af056f2606cae2323083d53c0" +
     "ea23f5ff1a6ab47d7c6aec05e6bc50cc32043336d425dc91517fa2286357e6f05" +
     "40a81997a738a01bde08830ede8db03b92bacbe64a6a4d224698cb33b8da6c029"),

    ("hyves.nl",
     "RSA-SHA1",
     "hyvespublic-c580e2c60d9d39489b288d77dbc13749.crt",
     "0xcec3e2e5d29be3b225be25e88b862ff7d12d27627bf4d3b402bc4002ac82a66e4d70efe0b16a76968c4b37c76e00bbc929b74af056f2606cae2323083d53c0ea23f5ff1a6ab47d7c6aec05e6bc50cc32043336d425dc91517fa2286357e6f0540a81997a738a01bde08830ede8db03b92bacbe64a6a4d224698cb33b8da6c029L"),
     
    ("www.google.com",
     "RSA-SHA1",
     "pub.1210278512.2713152949996518384.cer",
     "0x00d0515eee9087c88b16e890738d18c5bdf9e77413d5f89bdf48f2ea4f429de" +
     "202da88bd6b3b5c26c06c6ab3407d6a5fd634d21ad0e514508fc388ded46242cf" +
     "ca7f319639dbcba48939a17a5d4f9f2d838165621e5f6e1228568567e06bed4a3" +
     "2a6245b2833c351b442472f569677ef9d5f39108c4b0d7015f042f7c36f46276d"),
     
     ("partuza",
      "RSA-SHA1",
      "http://modules.partuza.nl/public.cer",
      "0x00b0aea7116e99321b9046549bf71b8f55ed134fa686ac32fa2e229ceb4f145" +
      "bec96803d1897f40a96853a12e0b7a5c3472986aa41474be525d6be0acb376f8d" +
      "d3579640bb0e17163643bd82d3b14cdf3d8755175132d83be3eced02d092ce010" +
      "b59c6cb0e91202613fa89a623bef14a23263411f80194deddf86bc57d84b3ee95"),

    ("friendconnect.google.com",
     "RSA-SHA1",
     "pub.1229714852.-8759618427808416822.cer",
     "0x00bef1cb4483f4b4ac05184c6a7c839fdb901dd961eafcecf80aebaca40ef9a6" +
     "f5e0e7ec3d1383f9a0c36618d10d3bb2c003ec52ad72cd0fe15d0e0e124c7ff915" +
     "6d18c9c3e1c3b2efaac79f4309e7b67d681c64d87df5913dba2f1d904370204967" +
     "6720cd79e6b171bd0fbaced3a7e291369ae9a4b0d6656deec16fc190de8049"),
     
    ("api.demo.avatarsunited.com",
     "RSA-SHA1",
     "http://api.demo.avatarsunited.com/opensocial/certificates/demo.crt",
     "0x00cb5fd5fa319732f0340c6df1913eca4a8d9621a1f565f34de003aafe391713" +
     "7c8af83fc582b4156862649dc07790584507f9d7a1280e690ae6e3dc133ed9b2a3" +
     "0ae920291325a8a41df269eac813cc50bae4ab6c8aa64f3367609e865498c2c401" +
     "32bbf8ec3f7cc4cf8adb0965a836e7e6ad6431619d65cc167c79a11d65ad79"),
     
    ("auapi.net",
     "RSA-SHA1",
     "auapi.net.pem",
     "0xa462e69dcd148c871fb2960c7d1291e25388e95ff8201e372925bba3c1073b3e332c3899c764541d426fa5541efef9bcbeaa701681c0c19fbbfd07f07b80c5a7796b0ba2f9cf389cb0fd322be24c8478c9a10db840f67e93f2ac1a65877130b58766e5ae902a222f8e66e623a0e027a3776392a8def375f89e8a46dcbbfc802dL"),     
     
     ("enterprise.google.com",
      "RSA-SHA1",
      "pub.1221166545.-8229534248194165910.cer",
      "0x00d846b7406910d233fa4caef1e7ee9d1b61f3960b3ac7470fef8e022fde5" +
      "2edd45670f458b481c799f5cb5b2a0b2c464830be7fcd2341b1913ce6df79bb1a" +
      "77008f66f7e782a050956fe128364970b6e02f6ef60382fd0eff92e078e2ac667" + 
      "af3e45c42aaa36f8c89f4224b7d694d9647925062496d9f1773dc9b9b350f60bb" +
      "0d"),
      
     ("ning.com",
      "RSA-SHA1",
      "test.ning.com",
      "0x00b4d8fdadd8662f66e6a18fc096f195237a79c337ea5ce9d54e324c1947108" +
      "b17f87528e811356e68e74a07c4e8aa9b247900b0feb184008f32372cae57fff9" +
      "cff781d1732a73a04d5a0ff761ed5a06f648f4bd89e9ffde42c14b5155699e90d" +
      "549502cc04727d699abd464b45aeabc68b1cfa862ecc4381ce5f3b3d859f64273"),
      
     ("www.opensocial.org",
      "RSA-SHA1",
      "test.ning.com",
      "0x00b4d8fdadd8662f66e6a18fc096f195237a79c337ea5ce9d54e324c1947108" +
      "b17f87528e811356e68e74a07c4e8aa9b247900b0feb184008f32372cae57fff9" +
      "cff781d1732a73a04d5a0ff761ed5a06f648f4bd89e9ffde42c14b5155699e90d" +
      "549502cc04727d699abd464b45aeabc68b1cfa862ecc4381ce5f3b3d859f64273"),
      
     ("ning.com",
      "RSA-SHA1",
      "ning.com.cert",
      "0x00b4d8fdadd8662f66e6a18fc096f195237a79c337ea5ce9d54e324c1947108" +
      "b17f87528e811356e68e74a07c4e8aa9b247900b0feb184008f32372cae57fff9" +
      "cff781d1732a73a04d5a0ff761ed5a06f648f4bd89e9ffde42c14b5155699e90d" +
      "549502cc04727d699abd464b45aeabc68b1cfa862ecc4381ce5f3b3d859f64273"),
     
]

# Import some overrides
try:
  customsettings = __import__("customsettings")
  PRIVATE_KEYS = customsettings.PRIVATE_KEYS
except:
  import logging
  logging.error("no custom settings: %s" % sys.exc_info()[1]) 
  pass
